package cl.uchile.sketchpad.persistance.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "subject_version_registration")
public class SubjectVersionRegistration implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private Integer id;
	private String userMail;
	private SubjectVersion subjectVersion;
	
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	public Integer getId() {
		return id;
	}
	
	public void setId(Integer id) {
		this.id = id;
	}
	
	@Column(name = "user_mail")
	public String getUserMail() {
		return userMail;
	}
	
	public void setUserMail(String userMail) {
		this.userMail = userMail;
	}
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "subject_version_id")
	public SubjectVersion getSubjectVersion() {
		return subjectVersion;
	}
	
	public void setSubjectVersion(SubjectVersion subjectVersion) {
		this.subjectVersion = subjectVersion;
	}
	
}
